/**
 * Tooltip Styles
 */

/* Base styles for the element that has a tooltip */
[data-tooltip="true"] {
  position: relative;
  cursor: pointer;
}

/* Base styles for the entire tooltip */
[data-tooltip="true"]:before,
[data-tooltip="true"]:after {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-in-out,
    visibility 0.2s ease-in-out,
    transform 0.2s cubic-bezier(0.71, 1.7, 0.77, 1.24);
  transition-delay: 0;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
  text-transform: none!important;
  font-family: 'Fira Sans';
  line-height: 15px;
  letter-spacing: initial;
}

[data-tooltip="true"]:hover {
  z-index: 99!important;
}

/* Show the entire tooltip on hover and focus */
[data-tooltip="true"]:hover:before,
[data-tooltip="true"]:hover:after,
[data-tooltip="true"]:focus:before,
[data-tooltip="true"]:focus:after {
  visibility: visible;
  opacity: 1;
  transition-delay: 600ms;
}

[data-tooltip="true"]:active:before,
[data-tooltip="true"]:active:after {
  visibility: hidden!important;
}

/* Base styles for the tooltip's directional arrow */
[data-tooltip="true"]:before {
  z-index: 1001;
  border: 6px solid transparent;
  background: transparent;
  content: "";
}

/* Base styles for the tooltip's content area */
[data-tooltip="true"]:after {
  z-index: 1000;
  padding: 3px 10px;
  background-color: #0C0C0C;
  color: #fff;
  content: attr(aria-label);
  font-size: 11px;
  white-space: nowrap;
  border-radius: 4px;
}

/* Directions */

/* Top (default) */
[data-tooltip="true"]:before,
[data-tooltip="true"]:after {
  bottom: 100%;
  left: 50%;
}

[data-tooltip="true"]:before {
  margin-left: -6px;
  margin-bottom: -12px;
  border-top-color: #0C0C0C;
}

[data-tooltip="true"]:hover:before,
[data-tooltip="true"]:hover:after,
[data-tooltip="true"]:focus:before,
[data-tooltip="true"]:focus:after {
  transform: translateY(-12px) translateX(0);
}

/* Left */
[data-tooltip-left="true"]:before,
[data-tooltip-left="true"]:after {
  right: 100%;
  bottom: 50%;
  left: auto;
}

[data-tooltip-left="true"]:before {
  margin-left: 0;
  margin-right: -12px;
  margin-bottom: 0;
  border-top-color: transparent;
  border-left-color: #0C0C0C;
}

[data-tooltip-left="true"]:hover:before,
[data-tooltip-left="true"]:hover:after,
[data-tooltip-left="true"]:focus:before,
[data-tooltip-left="true"]:focus:after {
  transform: translateX(-12px) translateY(50%);
}

/* Bottom */
[data-tooltip-bottom="true"]:before,
[data-tooltip-bottom="true"]:after {
  top: 100%;
  bottom: auto;
  left: 50%;
}

[data-tooltip-bottom="true"]:after {
  transform: translateY(0) translateX(-50%);
}

[data-tooltip-bottom="true"]:before {
  margin-top: -12px;
  margin-bottom: 0;
  border-top-color: transparent;
  border-bottom-color: #0C0C0C;
}


[data-tooltip-bottom="true"]:hover:before,
[data-tooltip-bottom="true"]:focus:before {
  transform: translateY(12px);
}

[data-tooltip-bottom="true"]:hover:after,
[data-tooltip-bottom="true"]:focus:after {
  transform: translateY(12px) translateX(-50%);
}

/* Bottom-Right */
[data-tooltip-bottom-right="true"]:before,
[data-tooltip-bottom-right="true"]:after {
  top: 100%;
  bottom: auto;
  left: 0;
}

[data-tooltip-bottom-right="true"]:before {
  margin-top: -10px;
  margin-bottom: 0;
  border-top-color: transparent;
  border-bottom-color: #0C0C0C;
}

[data-tooltip-bottom-right="true"]:hover:after,
[data-tooltip-bottom-right="true"]:focus:after {
  transform: translateY(12px);
}

[data-tooltip-bottom-right="true"]:hover:before,
[data-tooltip-bottom-right="true"]:focus:before {
  transform: translateY(12px) translateX(50%);
}

[data-tooltip-bottom-right="true"]:after {
  margin-left: 0;
}

[data-tooltip-bottom-right="true"]:before {
  margin-left: 0;
}

/* Right */
[data-tooltip-right="true"]:before,
[data-tooltip-right="true"]:after {
  bottom: 50%;
  left: 100%;
}

[data-tooltip-right="true"]:before {
  margin-bottom: 0;
  margin-left: -12px;
  border-top-color: transparent;
  border-right-color: #0C0C0C;;
}

[data-tooltip-right="true"]:hover:before,
[data-tooltip-right="true"]:hover:after,
[data-tooltip-right="true"]:focus:before,
[data-tooltip-right="true"]:focus:after {
  transform: translateX(12px) translateY(50%);
}

/* Vertically center tooltip content for left/right tooltips */
[data-tooltip-left="true"]:after,
[data-tooltip-right="true"]:after {
  margin-left: 0;
}
